﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvHold.aspx.cs" Inherits="WMS6.Web.Inventory.InvHold" meta:resourcekey="Page" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>InvHold Page</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />
    <script src="../Js/jquery.js" type="text/javascript"></script>
    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script> 
    <script src="../Js/util.js" type="text/javascript"></script>
    <script src="../Js/calendar.js" type="text/javascript" charset="gb2312"></script>
    <script src="../Js/InitPage.js" type="text/javascript"></script>
    <script src="../Js/checkbox.js" type="text/javascript"></script>
    <script src="../Js/Verification.js" type="text/javascript"></script>
    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initEditNewPage();
        }        
        
        function newHold()
        {
            var from = document.getElementById("hdnFrom").value;
            window.location.href = "InvHold.aspx?from=" + escape(from);
            return false;
        }        
        
        //弹出窗口选择货主
        function selectOwner()
        {
            var rtnValue = popModalWindow('../Configuration/OwnerQuery.aspx?action=txtOwnerID','dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById("txtOwnerID").focus();
                document.getElementById("txtOwnerID").value = rtnValue;
            }
        }
        
         //弹出窗口选择批号
        function selectLot()
        {
            var rtnValue = popModalWindow('../Inventory/LotAttributeQuery.aspx?action=txtLot','dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById("txtLot").focus();
                document.getElementById("txtLot").value = rtnValue;
                //__doPostBack("txtCarrierID_TextChanged","");
            }
        }
             //弹出窗口选择批号
        function selectLpn()
        {
            var rtnValue = popModalWindow('../Inventory/LpnQuery.aspx?action=txtLot','dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById("txtLpn").focus();
                document.getElementById("txtLpn").value = rtnValue;
                //__doPostBack("txtCarrierID_TextChanged","");
            }
        }
        
         //弹出窗口选择货位
        function selectLoc()
        {
            var rtnValue = popModalWindow('../Configuration/LocationQuery.aspx?action=txtLoc','dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById("txtLoc").focus();
                document.getElementById("txtLoc").value = rtnValue;
                //__doPostBack("txtCarrierID_TextChanged","");
            }
        }
        
          //弹出窗口选择货品
        function selectSku() {
            var rtnValue = popModalWindow('../Configuration/SkuQuery.aspx?action=txtSkuID&type=1&ownerID=' + escape(document.getElementById('txtOwnerID').value) + '', 'dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                var _Value = rtnValue.split('@_@');
                document.getElementById("txtSkuID").focus();
                document.getElementById("txtSkuID").value = _Value[0];
                document.getElementById("txtOwnerID").value = _Value[1];
                document.getElementById("txtSkuDesrc").value = _Value[2];
                //__doPostBack("txtCarrierID_TextChanged","");
            }
        }
        
        function changeDesr()
        {
//            var ownerID = document.getElementById("txtOwnerID").value;
//            if(ownerID == "")
//            {
//                document.getElementById("lblMsg").value = "请输入货主!";
//                document.getElementById("txtOwnerID").focus();
//            }
//            var SkuID = document.getElementById("txtSkuID").value;
//            if(SkuID == "")
//            {
//                document.getElementById("lblMsg").value = "请输入货品!";
//                document.getElementById("txtOwnerID").focus();
//            }
//            if(SkuID != "" && ownerID != "")
//            {
//                __doPostBack("txtSkuID_TextChanged","");
//             }
              __doPostBack("txtSkuID_TextChanged","");
        }

        function confirmMsg(code)
        {
            if(code == "C001")
            {
                if(confirm('<%=GetGlobalMsgResource("C001") %>'))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }

        }
        
    </script>
</head>
<body>
    <form id="F5051" runat="server" defaultbutton="btnSave">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        
        
         <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom"><asp:Label ID="lblOwner" runat="server" CssClass="label_header" 
                            Text="库存冻结" meta:resourcekey="lblOwner"></asp:Label></td>

                    <td><asp:Button ID="btnNew" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnNew%>"  
                            Enabled="False"  AccessKey="n" onclick="btnNew_Click" /></td>
                    <td><asp:Button ID="btnSave" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnSave%>"  Enabled="False"
                            AccessKey="s" onclick="btnSave_Click"  /></td>
                     <td>
                        <asp:Button ID="btnDelete" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnDelete%>"  Enabled="False" OnClientClick="javascript:if(confirmMsg('C001')) return true; else return false;"
                             onclick="btnDelete_Click" />
                     </td>
                     <td>
                        <asp:Button ID="btnRefresh" runat="server" CssClass="button" Enabled="False" 
                             Text="<%$Resources:ButtonResource,btnRefresh%>" AccessKey="r" />
                    </td>       
                </tr>
            </table>
        </div>
        
        
       <%-- <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>--%>
                <div>
                    <asp:Label ID="lblMsg" runat="server" CssClass="label_message" 
                        meta:resourcekey="lblMsg"></asp:Label>
                </div>
                
               <div id="div_menu">
                    <div style="float: left; width: 8px;">
                        <div class="tabL" id="divL1"></div>
                    </div>
                    <div style="float:left;" class="tabLabelCont tabCur" onclick="setTab('one',1,6)" id="divM1">
                        <asp:Label ID="one1" CssClass="hover" runat="server" 
                            meta:resourcekey="one1">基本信息</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR" id="divR1"></div>
                    </div>
              </div>
              
              <div id="div_content">
                 <div id="con_one_1" style="display:block;">
                    <table width="720px" style="display: block; margin-left: 10px; margin-top: 10px;">
                        <tr>
                            <td width="180px">
                                <asp:Label ID="lblInvHoldID" runat="server" CssClass="label" Text="冻结编号" 
                                    meta:resourcekey="lblInvHoldID"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lbl" runat="server" CssClass="label" Text="冻结方式" 
                                    meta:resourcekey="lbl"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblHoldDate" runat="server" CssClass="label" Text="冻结日期" 
                                    meta:resourcekey="lblHoldDate"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:TextBox ID="txtInvHoldID" runat="server" CssClass="textbox" 
                                    Enabled="False" meta:resourcekey="txtInvHoldID"></asp:TextBox>
                            </td>
                            <td width="180px">
                                <asp:DropDownList ID="ddl" runat="server" CssClass="mediumselectbox" 
                                    AutoPostBack="True" onselectedindexchanged="ddl_SelectedIndexChanged" 
                                    meta:resourcekey="ddl">
                                </asp:DropDownList>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtHoldDate" runat="server" CssClass="textbox" 
                                    onblur="JavaScript:dataVer._IsTime(this,'lblMsg')" 
                                    meta:resourcekey="txtHoldDate"></asp:TextBox><img src="../Images/calendar.gif" class="img" alt="请选择日期" id="imgTime" runat="server" onclick="setday(this,txtHoldDate)"/>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:Label ID="lblLot" runat="server" CssClass="label" Text="批次号" 
                                    meta:resourcekey="lblLot"></asp:Label><font id="fontLot" runat="server" class="must_input">*</font>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblOwnerID" runat="server" CssClass="label" Text="货主代码" 
                                    meta:resourcekey="lblOwnerID"></asp:Label><font id="fontOwner" runat="server" class="must_input">*</font>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblHoldBy" runat="server" CssClass="label" Text="冻结人" 
                                    meta:resourcekey="lblHoldBy"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:TextBox ID="txtLot" runat="server" CssClass="textbox" 
                                    meta:resourcekey="txtLot"></asp:TextBox><img src="../Images/icon_find.gif" alt="select one item" id="imgLot" runat="server" class="img" onclick="selectLot();"/>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtOwnerID" runat="server" CssClass="textbox"  AutoPostBack="True"
                                    ontextchanged="txtOwnerID_TextChanged" 
                                    meta:resourcekey="txtOwnerID"></asp:TextBox><img src="../Images/icon_find.gif" alt="select one item" id="imgOwnerID" runat="server"  class="img" onclick="selectOwner();"/>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtHoldBy" runat="server" CssClass="textbox" 
                                    meta:resourcekey="txtHoldBy"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:Label ID="lblLoc" runat="server" CssClass="label" Text="货位" 
                                    meta:resourcekey="lblLoc"></asp:Label><font id="fontLoc" runat="server" class="must_input">*</font>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblSkuID" runat="server" CssClass="label" Text="货品代码" 
                                    meta:resourcekey="lblSkuID"></asp:Label><font id="fontSkuID" runat="server" class="must_input">*</font>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblReleaseDate" runat="server" CssClass="label" Text="释放日期" 
                                    meta:resourcekey="lblReleaseDate"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:TextBox ID="txtLoc" runat="server" CssClass="textbox" 
                                    meta:resourcekey="txtLoc"></asp:TextBox><img src="../Images/icon_find.gif" alt="select one item" id="imgLoc" runat="server" class="img" onclick="selectLoc();"/>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtSkuID" runat="server" CssClass="textbox"  
                                    ontextchanged="txtSkuID_TextChanged" AutoPostBack="True" 
                                    meta:resourcekey="txtSkuID" ></asp:TextBox><img src="../Images/icon_find.gif" alt="select one item" id="imgSkuID" runat="server" class="img" onclick="selectSku();"/>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtReleaseDate" runat="server" 
                                    onblur="JavaScript:dataVer._IsTime(this,'lblMsg')" CssClass="textbox" 
                                    meta:resourcekey="txtReleaseDate"></asp:TextBox><img src="../Images/calendar.gif" class="img" alt="请选择日期" id="img1" runat="server" onclick="setday(this,txtReleaseDate)"/>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:Label ID="lblLpn" runat="server" CssClass="label" Text="LPN" 
                                    meta:resourcekey="lblLpn"></asp:Label><font id="fontLpn" runat="server" class="must_input">*</font>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblSkuDesrc" runat="server" CssClass="label" Text="货品描述" 
                                    meta:resourcekey="lblSkuDesrc"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblReleaseBy" runat="server" CssClass="label" Text="释放人" 
                                    meta:resourcekey="lblReleaseBy"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:TextBox ID="txtLpn" runat="server" CssClass="textbox" 
                                    meta:resourcekey="txtLpn"></asp:TextBox><img src="../Images/icon_find.gif" alt="select one item" id="imgLpn" runat="server" class="img" onclick="selectLpn();"/>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtSkuDesrc" runat="server" CssClass="textbox" 
                                    meta:resourcekey="txtSkuDesrc"></asp:TextBox>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtReleaseBy" runat="server" CssClass="textbox" 
                                    meta:resourcekey="txtReleaseBy"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:Label ID="lblHoldReasonCode" runat="server" CssClass="label" Text="冻结原因代码" 
                                    meta:resourcekey="lblHoldReasonCode"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblHoldReasonDesrc" runat="server" CssClass="label" 
                                    Text="冻结原因描述" meta:resourcekey="lblHoldReasonDesrc"></asp:Label>
                            </td>
                            <td width="180px">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td width="180px">
                                <asp:DropDownList ID="ddlHoldReasonCode" runat="server" 
                                    CssClass="mediumselectbox" meta:resourcekey="ddlHoldReasonCode"></asp:DropDownList>
                            </td>
                            <td width="180px">
                                <asp:TextBox ID="txtHoldReasonDesrc" runat="server" CssClass="textbox" 
                                    meta:resourcekey="txtHoldReasonDesrc"></asp:TextBox>
                            </td>
                            <td width="180px">
                                <asp:CheckBox ID="chbIsHold" runat="server" CssClass="checkbox" Text="冻结" 
                                    Checked="True" AutoPostBack="True" 
                                    oncheckedchanged="chbIsHold_CheckedChanged" 
                                    meta:resourcekey="chbIsHold" />
                            </td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                        </tr>
                    </table>
                 </div>
              </div>
              <input type="hidden" id="hdnInvHoldID" runat="server" />
              <input type="hidden" id="hdnFlag"  runat="server" value="0" />
              <input type="hidden" id="hdnHoldType" runat="server" value="BYLOTLOCLPN"/>
        <%--</ContentTemplate>
             <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnNew" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="btnRefresh" EventName="Click" />
                </Triggers>
       </asp:UpdatePanel>--%>
        <input type="hidden" id="hdnFrom" runat="server" />
        <input type="hidden" id="hdnActionID" runat="server" />
        <input type="hidden" id="hdnIsHoldStatus" runat="server" />
<input type="hidden" id="hdnDataFormat"  runat="server"/>  
<input type="hidden" id="hdncalendarFlag"  runat="server"/>  

    </div>
    </form>
</body>
</html>
<script language="javascript" type="text/javascript" event="onclick" for="document">
		<!--
			hiddenCalendarDiv();
		//-->
</script>